package com.zc.angelica.controller;


import com.zc.angelica.entity.LastingLogin;
import com.zc.angelica.entity.ResponseData;
import com.zc.angelica.service.LastingLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * 持久化登录(LastingLogin)表控制层
 *
 * @author makejava
 * @since 2022-04-10 18:34:42
 */
@RestController
@RequestMapping("/lastingLogin")
public class LastingLoginController {

    @Autowired
    private LastingLoginService lastingLoginService;


    @PostMapping("/addLastingLogin")
    public ResponseData addLastingLogin(@RequestBody LastingLogin lastingLogin) {
        return lastingLoginService.addLastingLogin(lastingLogin);
    }


    @GetMapping("/forcedLogout")
    public ResponseData forcedLogout(Long id) {
        return lastingLoginService.forcedLogout(id);
    }


    @GetMapping("/updateLastingLogin")
    public ResponseData updateLastingLogin(LastingLogin lastingLogin) {
        return lastingLoginService.updateLastingLogin(lastingLogin);
    }

}

